package com.tdam2011.grupo06.model;

import com.tdam2011.grupo06.R;

import android.app.Activity;
import android.provider.ContactsContract;

public class Telefono
{	
	private String numero;
	private int tipo;
	private int id;

	public Telefono(int i, String n, int ti)
	{
		id = i;
		numero = n;
		tipo = ti;
	}
	
	public Telefono()
	{
		id = 0;
		numero = "";
		tipo = 0;
	}
	
	public int getId() {
		return id;
	}

	public void setId(int i) {
		this.id = i;
	}
	
	public int getTipo() {
		return tipo;
	}

	public void setTipo(int tipo) {
		this.tipo = tipo;
	}
	
	public String getNumero() {
		return numero;
	}

	public void setNumero(String tel) {
		this.numero = tel;
	}
	public String getTipoString(Activity caller)
	{
		switch (tipo)
		{
			case ContactsContract.CommonDataKinds.Phone.TYPE_CUSTOM:
			return caller.getResources().getString(R.string.TYPE_CUSTOM);
			case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:
				return caller.getResources().getString(R.string.TYPE_HOME);
			case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:
				return caller.getResources().getString(R.string.TYPE_MOBILE);
			case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:
				return caller.getResources().getString(R.string.TYPE_WORK);
			case ContactsContract.CommonDataKinds.Phone.TYPE_FAX_WORK:
				return caller.getResources().getString(R.string.TYPE_FAX_WORK);
			case ContactsContract.CommonDataKinds.Phone.TYPE_FAX_HOME:
				return caller.getResources().getString(R.string.TYPE_FAX_HOME);
			case ContactsContract.CommonDataKinds.Phone.TYPE_PAGER:
				return caller.getResources().getString(R.string.TYPE_PAGER);
			case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER:
				return caller.getResources().getString(R.string.TYPE_OTHER);
			case ContactsContract.CommonDataKinds.Phone.TYPE_CALLBACK:
				return caller.getResources().getString(R.string.TYPE_CALLBACK);
			case ContactsContract.CommonDataKinds.Phone.TYPE_CAR:
				return caller.getResources().getString(R.string.TYPE_CAR);
			case ContactsContract.CommonDataKinds.Phone.TYPE_COMPANY_MAIN:
				return caller.getResources().getString(R.string.TYPE_COMPANY_MAIN);
			case ContactsContract.CommonDataKinds.Phone.TYPE_ISDN:
				return caller.getResources().getString(R.string.TYPE_ISDN);
			case ContactsContract.CommonDataKinds.Phone.TYPE_MAIN:
				return caller.getResources().getString(R.string.TYPE_MAIN);
			case ContactsContract.CommonDataKinds.Phone.TYPE_OTHER_FAX:
				return caller.getResources().getString(R.string.TYPE_OTHER_FAX);
			case ContactsContract.CommonDataKinds.Phone.TYPE_RADIO:
				return caller.getResources().getString(R.string.TYPE_RADIO);
			case ContactsContract.CommonDataKinds.Phone.TYPE_TELEX:
				return caller.getResources().getString(R.string.TYPE_TELEX);
			case ContactsContract.CommonDataKinds.Phone.TYPE_TTY_TDD:
				return caller.getResources().getString(R.string.TYPE_TTY_TDD);
			case ContactsContract.CommonDataKinds.Phone.TYPE_WORK_MOBILE:
				return caller.getResources().getString(R.string.TYPE_WORK_MOBILE);
			case ContactsContract.CommonDataKinds.Phone.TYPE_WORK_PAGER:
				return caller.getResources().getString(R.string.TYPE_WORK_PAGER);
			case ContactsContract.CommonDataKinds.Phone.TYPE_ASSISTANT:
				return caller.getResources().getString(R.string.TYPE_ASSISTANT);
			case ContactsContract.CommonDataKinds.Phone.TYPE_MMS:
				return caller.getResources().getString(R.string.TYPE_MMS);
			default:
				return"";
		
		}
	}
}
